#include <bits/stdc++.h>

using namespace std;
#define int long long

void solve()
{
    int n;
    cin >> n;
    cout << fixed << setprecision(8);
    vector<pair<double, double>> a(n);
    for (int i = 0; i < n; i++)
    {
        double x, y;
        cin >> x >> y;
        a[i] = { x,y };
    }
    double ans = 0.00;
    for (int i = 1; i < n; i++)
    {
        double e = sqrt(pow(a[i].first - a[i - 1].first, 2.0) + pow(a[i].second - a[i - 1].second, 2.0));
        double k = log2(e * log(2)) < 0 ? 0 : log2(e * log(2));
        double t = 2 * k + 2 * e / pow(2, k);
        ans += t;
    }
    cout << ans << endl;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int _ = 1;
    //cin >> _;
    while (_--)
    {
        solve();
    }
    return 0;
}